import request from "@/utils/request";

// 查询room列表
export function listRoom(query) {
  return request({
    url: "/hotelRoom/list",
    method: "get",
    params: query,
  });
}

// 分页查询room列表
export function listRoomByPage(query) {
  return request({
    url: "/hotelRoom/page",
    method: "get",
    params: query,
  });
}

// 查询room
export function getRoom(id) {
  return request({
    url: "/hotelRoom/" + id,
    method: "get",
  });
}

// 新增room
export function addRoom(data) {
  return request({
    url: "/hotelRoom",
    method: "post",
    data: data,
  });
}

// 修改room
export function updateRoom(data) {
  return request({
    url: "/hotelRoom",
    method: "put",
    data: data,
  });
}

// 删除room
export function deleteRoom(id) {
  return request({
    url: "/hotelRoom/delete/" + id,
    method: "delete",
  });
}
